<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例3</title>
    <script src="jquery.js"></script>
    <script>
        $(function (){
            $("#message").keypress(function (event){
                console.log("keypress",event.key)
            }).keyup(function (event){
                console.log("keyup",event.key)
            }).keydown(function (event){
                console.log("keydown",event.key,event.keyCode)
            })
        })
    </script>
</head>
<body>
    <input id="message"/>
</body>
</html>